<?php
	require "../dao/student_dao.php";

	$stusec = [];
	$stusec["stu_secid"] = $_POST["stu_secid"];
	$stusec["sections"] = implode(",",$_POST["sections"]);
	
	$flag = insertStuSection($stusec);
	
	
	if($flag){
?>
		<script>
			alert("添加成功。。。。");
		</script>
<?php
	}else{
?>
		<script>
			alert("添加失败。。。。");
			location.href = "Stu_sections.php";
		</script>
<?php
	}
?>